package com.lxh.lxhcrm.model.pojos;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

/**
 * 开票记录表
 */
@Entity
@Table(name = "invoice_rec", schema = "lxh_crm", catalog = "")
public class InvoiceRec {
    private int invoiceRecId;
    private Integer workordId;
    private Integer customerId;
    private String invCon;
    private Double invMoney;
    private String invType;
    private Date invBeginDate;
    private Integer invTimes;
    private Integer empId;
    private Integer isReturnMon;
    private String remark;

    @Id
    @Column(name = "invoice_rec_id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public int getInvoiceRecId() {
        return invoiceRecId;
    }

    public void setInvoiceRecId(int invoiceRecId) {
        this.invoiceRecId = invoiceRecId;
    }

    @Basic
    @Column(name = "workord_id", nullable = true)
    public Integer getWorkordId() {
        return workordId;
    }

    public void setWorkordId(Integer workordId) {
        this.workordId = workordId;
    }

    @Basic
    @Column(name = "customer_id", nullable = true)
    public Integer getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Integer customerId) {
        this.customerId = customerId;
    }

    @Basic
    @Column(name = "inv_con", nullable = true, length = 0)
    public String getInvCon() {
        return invCon;
    }

    public void setInvCon(String invCon) {
        this.invCon = invCon;
    }

    @Basic
    @Column(name = "inv_money", nullable = true, precision = 0)
    public Double getInvMoney() {
        return invMoney;
    }

    public void setInvMoney(Double invMoney) {
        this.invMoney = invMoney;
    }

    @Basic
    @Column(name = "inv_type", nullable = true, length = 40)
    public String getInvType() {
        return invType;
    }

    public void setInvType(String invType) {
        this.invType = invType;
    }

    @Basic
    @Column(name = "inv_begin_date", nullable = true)
    public Date getInvBeginDate() {
        return invBeginDate;
    }

    public void setInvBeginDate(Date invBeginDate) {
        this.invBeginDate = invBeginDate;
    }

    @Basic
    @Column(name = "inv_times", nullable = true)
    public Integer getInvTimes() {
        return invTimes;
    }

    public void setInvTimes(Integer invTimes) {
        this.invTimes = invTimes;
    }

    @Basic
    @Column(name = "emp_id", nullable = true)
    public Integer getEmpId() {
        return empId;
    }

    public void setEmpId(Integer empId) {
        this.empId = empId;
    }

    @Basic
    @Column(name = "is_return_mon", nullable = true)
    public Integer getIsReturnMon() {
        return isReturnMon;
    }

    public void setIsReturnMon(Integer isReturnMon) {
        this.isReturnMon = isReturnMon;
    }

    @Basic
    @Column(name = "remark", nullable = true, length = 200)
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        InvoiceRec that = (InvoiceRec) o;
        return invoiceRecId == that.invoiceRecId &&
                Objects.equals(workordId, that.workordId) &&
                Objects.equals(customerId, that.customerId) &&
                Objects.equals(invCon, that.invCon) &&
                Objects.equals(invMoney, that.invMoney) &&
                Objects.equals(invType, that.invType) &&
                Objects.equals(invBeginDate, that.invBeginDate) &&
                Objects.equals(invTimes, that.invTimes) &&
                Objects.equals(empId, that.empId) &&
                Objects.equals(isReturnMon, that.isReturnMon) &&
                Objects.equals(remark, that.remark);
    }

    @Override
    public int hashCode() {
        return Objects.hash(invoiceRecId, workordId, customerId, invCon, invMoney, invType, invBeginDate, invTimes, empId, isReturnMon, remark);
    }
}
